//
//  BaseVC.m
//  NavigationDemo
//
//  Created by 商广硕 on 2022/7/16.
//

#import "BaseVC.h"

@interface BaseVC ()

@end

@implementation BaseVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    self.navigationController.navigationBar.hidden = YES;
    NativeView* navView = [NativeView loadView];
    self.navView = navView;
    [self.view addSubview:navView];
    
    [navView.backBtn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
    
    
    [navView.rightBtn addTarget:self action:@selector(rightBack) forControlEvents:UIControlEventTouchUpInside];
    
    if (self.isHidden) {
        self.navView.hidden = YES;
    }
    
}
- (void)setBarTitle:(NSString *)barTitle {
    _barTitle = barTitle;
    self.navView.customTitle.text = barTitle;
}
- (void)setIsHidden:(BOOL)isHidden{
    _isHidden =isHidden;
    self.navView.hidden = YES;
    
}
- (void)setRightTitle:(NSString *)rightTitle{
    _rightTitle = rightTitle;
    [self.navView.rightBtn setTitle:rightTitle forState:UIControlStateNormal];
}
-(void)back{
    NSLog(@"EWWWWWW");
    [self.navigationController popViewControllerAnimated:YES];
    
}
-(void)rightBack{
    
}


@end
